package demo.socket;

import java.io.IOException;
import java.io.PrintWriter;
import java.net.ServerSocket;
import java.net.Socket;

public class HtmlServer {

	public static void main(String[] args) throws IOException {
		// TODO �Զ����ɵķ������
		ServerSocket ss = new ServerSocket(10000);
		Socket s = ss.accept();
		System.out.println(s.getInetAddress().getHostName() + "...connected");
		byte[] buf = new byte[1024];
		int len = s.getInputStream().read(buf);
		System.out.println(new String(buf, 0, len));
		PrintWriter pw = new PrintWriter(s.getOutputStream(), true);
		pw.println("<font color='red' size='7'>�ͻ������</font>");
		s.close();
		ss.close();
	}

}
